package fun.chutianshu.competitionmanagement.controller;

import fun.chutianshu.competitionmanagement.Util.ApiResult;
import fun.chutianshu.competitionmanagement.pojo.UserInfo;
import fun.chutianshu.competitionmanagement.service.UserInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/api/userinfo")
public class UserInfoController {
    @Autowired
    UserInfoService userInfoService;


    @GetMapping("/getall")
    public List<UserInfo> getAll(){
        return userInfoService.getAllUserInfos();
    }
}
